// 这里村的是localStorage,村的是的cookie
import Cookies from 'js-cookie'

const TokenKey = 'hmhr72'

export function getToken () {
  return Cookies.get(TokenKey)
}

export function setToken (token) {
  return Cookies.set(TokenKey, token, {
    expires: new Date(Date.now() + 7 * 7 * 6 * 60 * 60 * 1000)
  })
}

export function removeToken () {
  return Cookies.remove(TokenKey)
}
